Native connection to SQL database

If the datasource of the subreport is of an SQL-type (for example, MS SQL Server), and the report is connecting natively (P2SSQL.DLL), then you can use code similar to the following:

  1. Get the Tables collection for the subreport.
Set CRXTables = CRXSubreport.Database.Tables 
  1. Get the first table from the Tables collection.
Set CRXTable = CRXTables.Item(1) 
  1. Finally, set the location of the .mdb file.
CRXTable.SetLogOnInfo <servername>, <databasename>, <userid>, <password> 


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com